<template>
	<view class="help-detail">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				title: '',
				content: '',
			}
		},
		onLoad(option) {
			if (option.id) {
				this.getDetail(option.id)
			}

		},

		methods: {
			async getDetail(id) {
				let res = await this.$api.getHelpListDetail({
					id
				})
				if (res.success) {
					console.log(res.result);
					let {
						content,
						title
					} = res.result
					this.content = content || ""
					this.title = title || ""
				} else {
					uni.showToast({
						title: '查询失败正在返回上一页',
						icon: 'none'
					})
					setTimeout(() => {
						uni.navigateBack()
					}, 2000)

				}
			},


		}
	}
</script>

<style lang="scss" scoped>
	.help-detail {
		margin: 32rpx;
		padding-bottom: 80rpx;
	}
</style>